/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var SlideController = new Class({
    
    slides: new Array(),
    pointer: 0,
    
    addSlide: function(slide){
        this.slides[this.slides.length] = slide;
    },
    
    getFirstSlide: function(){
        return this.slides[0];
    },
    
    getCurrentSlide: function(){
        //console.log(this.slides[this.pointer]);
        return this.slides[this.pointer];
    },
    
    getNextSlide: function(){
        return this.slides[(this.pointer+1)%this.slides.length];  
    },
    
    shift: function(){
      this.pointer = ++this.pointer%this.slides.length;  
    },
    
    countSlides: function(){
        return this.slides.length;
    }
    
});


